<!-- SPDX-License-Identifier: MIT -->

{%- if display_toc %}
  <div>
    {#- compared to default localtoc.html, we use `parent_index` instead of `root_doc` if provided #}
    <h3><a href="{{ pathto(parent_index or root_doc)|e }}">{{ _('Table of Contents') }}</a></h3>
    {{ toc }}
  </div>
{%- endif %}
